﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>显示OpenStreet</title>
    <script include="jquery" src="./static/libs/include-lib-local.js"></script>
    <script src="./static/libs/include-openlayers-local.js"></script>
    <script type="text/javascript">
        //地图初始化函数
        function init(){
            //实例化Map对象加载地图
            var map = new ol.Map({
                //地图容器div的ID
                target: 'map',
                //地图容器中加载的图层
                layers: [
                    //加载瓦片图层数据（OSM）
                    new ol.layer.Tile({
                        source: new ol.source.OSM()
                    })
                ],
                //地图视图设置
                view: new ol.View({
                    //地图初始中心点
                    center: [11550000, 3860000],
                    //地图初始显示级别
                    zoom: 4,
                    //最小级别
                    minZoom: 3,
                    //最大级别
                    maxZoom: 12
                })
            });
        }
    </script>
</head>

<body onload="init()">
<div id="map" style="width: 100%; height: 90%; position: absolute;">
</div>
</body>

</html>
